<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BrokenIRC: client_src/main.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">BrokenIRC
   &#160;<span id="projectnumber">0.0.42</span>
   </div>
   <div id="projectbrief">A &#39;not so functionnal&#39; irc server and a WIP client</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_4f864d14a2851fdffc87fa051d1e74b7.html">client_src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">main.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="client_8h_source.html">../include/client.h</a>&quot;</code><br />
<code>#include &lt;ncurses.h&gt;</code><br />
<code>#include &lt;sys/epoll.h&gt;</code><br />
<code>#include &lt;unistd.h&gt;</code><br />
<code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;stdio.h&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for main.c:</div>
<div class="dyncontent">
<div class="center"><img src="main_8c__incl.png" border="0" usemap="#client__src_2main_8c" alt=""/></div>
<map name="client__src_2main_8c" id="client__src_2main_8c">
<area shape="rect" id="node2" href="client_8h.html" title="../include/client.h" alt="" coords="5,80,127,107"/>
</map>
</div>
</div>
<p><a href="main_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa26fd2ae6485d8ce470d397802787dd5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#aa26fd2ae6485d8ce470d397802787dd5">write_separator</a> (void)</td></tr>
<tr class="separator:aa26fd2ae6485d8ce470d397802787dd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a767aa034c2b7e6e21e43026db0e3baa6"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a767aa034c2b7e6e21e43026db0e3baa6">getmessage</a> (void)</td></tr>
<tr class="separator:a767aa034c2b7e6e21e43026db0e3baa6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c99d968a34e803d378692bde2e3f18f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="main_8c.html#a0c99d968a34e803d378692bde2e3f18f">main</a> (int ac, char **av)</td></tr>
<tr class="separator:a0c99d968a34e803d378692bde2e3f18f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a767aa034c2b7e6e21e43026db0e3baa6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a767aa034c2b7e6e21e43026db0e3baa6">&#9670;&nbsp;</a></span>getmessage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* getmessage </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="main_8c_source.html#l00026">26</a> of file <a class="el" href="main_8c_source.html">main.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;{</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        <span class="keyword">static</span> <span class="keywordtype">char</span> message[515];</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        read(0, message, 515);</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;        <span class="keywordflow">return</span> message;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a id="a0c99d968a34e803d378692bde2e3f18f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c99d968a34e803d378692bde2e3f18f">&#9670;&nbsp;</a></span>main()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ac</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>av</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="main_8c_source.html#l00034">34</a> of file <a class="el" href="main_8c_source.html">main.c</a>.</p>

<p class="reference">References <a class="el" href="main_8c_source.html#l00015">write_separator()</a>.</p>
<div class="fragment"><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;{</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keywordflow">if</span> (ac != 2) {</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;                <span class="keywordflow">return</span> 84;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (av) {</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;                initscr();</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;                <a class="code" href="main_8c.html#aa26fd2ae6485d8ce470d397802787dd5">write_separator</a>();</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;                move(LINES -1, 0);</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;                printw(<span class="stringliteral">&quot;message:&quot;</span>);</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;                refresh();</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;                getch();</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;                endwin();</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        }</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;}</div><div class="ttc" id="main_8c_html_aa26fd2ae6485d8ce470d397802787dd5"><div class="ttname"><a href="main_8c.html#aa26fd2ae6485d8ce470d397802787dd5">write_separator</a></div><div class="ttdeci">void write_separator(void)</div><div class="ttdef"><b>Definition:</b> <a href="main_8c_source.html#l00015">main.c:15</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="main_8c_a0c99d968a34e803d378692bde2e3f18f_cgraph.png" border="0" usemap="#main_8c_a0c99d968a34e803d378692bde2e3f18f_cgraph" alt=""/></div>
<map name="main_8c_a0c99d968a34e803d378692bde2e3f18f_cgraph" id="main_8c_a0c99d968a34e803d378692bde2e3f18f_cgraph">
<area shape="rect" id="node2" href="main_8c.html#aa26fd2ae6485d8ce470d397802787dd5" title="write_separator" alt="" coords="104,5,215,32"/>
</map>
</div>

</div>
</div>
<a id="aa26fd2ae6485d8ce470d397802787dd5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa26fd2ae6485d8ce470d397802787dd5">&#9670;&nbsp;</a></span>write_separator()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void write_separator </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="main_8c_source.html#l00015">15</a> of file <a class="el" href="main_8c_source.html">main.c</a>.</p>

<p class="reference">Referenced by <a class="el" href="main_8c_source.html#l00034">main()</a>.</p>
<div class="fragment"><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;{</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;        <span class="keywordtype">int</span> i = 0;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;        <span class="keywordflow">while</span> (i &lt; COLS) {</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;                move(LINES - 2, i);</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;                printw(<span class="stringliteral">&quot;_&quot;</span>);</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;                i++;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;        }</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;}</div></div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="main_8c_aa26fd2ae6485d8ce470d397802787dd5_icgraph.png" border="0" usemap="#main_8c_aa26fd2ae6485d8ce470d397802787dd5_icgraph" alt=""/></div>
<map name="main_8c_aa26fd2ae6485d8ce470d397802787dd5_icgraph" id="main_8c_aa26fd2ae6485d8ce470d397802787dd5_icgraph">
<area shape="rect" id="node2" href="main_8c.html#a0c99d968a34e803d378692bde2e3f18f" title="main" alt="" coords="164,5,215,32"/>
</map>
</div>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
